package org.example.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
//@Component:基本注解，标识了一个受Spring管理的组件
//@Repository:标识持久层组件
//@Service:标识服务层（业务层）组件
//@Controller:标识表现层组件
@Component("userd")
public class user {
    @Value("1")
    int id;
    @Value("项目")
    String name;
    @Value("156")
    String charst;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCharst() {
        return charst;
    }

    public void setCharst(String charst) {
        this.charst = charst;
    }

    public user(int id) {
        this.id = id;
    }

    public user() {
    }

    public user(int id, String name, String charst) {
        this.id = id;
        this.name = name;
        this.charst = charst;
    }

    public user(String name, String charst) {
        this.name = name;
        this.charst = charst;
    }

    @Override
    public String toString() {
        return "user{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", charst='" + charst + '\'' +
                '}';
    }
}
